class CreateAuthorships < ActiveRecord::Migration
  def self.up
    create_table :authorships do |t|
      t.integer :author_id
      t.integer :work_id
      t.timestamps
      
      t.foreign_key :author_id, :authors, :id
      t.foreign_key :work_id, :works, :id
    end
  end

  def self.down
    drop_table :authorships
  end
end
